package service.impl;

import dao.NewsDao;
import dao.impl.NewsDaoImpl;
import factory.SimpleDaoFactory;
import pojo.News;
import service.NewsService;

public class NewsServiceImpl implements NewsService {
//    private NewsDao newsDao = SimpleDaoFactory.getInstance();
    private NewsDao newsDao;
    public void setNewsDao(NewsDao newsDao) {
        this.newsDao = newsDao;
    }
    public void addNews(News news) {
        newsDao.save(news);
    }
    @Override
    public void save(News news) {
        newsDao.save(news);
    }
}
